A. Field of the Invention
The present invention relates to a method and apparatus for adjusting the picture quality of a digital image display, especially to the method and apparatus for adjusting the picture quality of a liquid crystal display (LCD) in response to a requested degree of sharpness by providing a two-order interpolation function.
B. Description of the Prior Art
For digital display devices, such as Liquid Crystal Display (LCD), Digital Micro-mirror Device (DMD), plasma display, if their resolutions or image frame rates are different from that of the source image, then they will need an image scaler for interpolation and frame rate conversion. Image up-scaling or down-scaling refers to the change in the image resolution. For up-scaling an image, the position and gray levels of interpolated pixels must be computed and inserted to the position determined for the interpolated pixels. The newly interpolated pixels are closely related to their neighboring pixels. The relationship between an interpolated pixel and its neighboring pixels is represented by a weight to distance function. Such relationship is defined as an interpolation function. The newly interpolated pixels can be computed by a convolution computation based on the interpolation function and the sampling input pixels. Moreover, the picture qualities of the digital image are determined by the interpolation function applied thereto.
Refer to FIG. 1 for showing the structure of a control board of the LCD. It mainly includes a LCD monitor 11, an image scaler 12, and an Analog to Digital Converter 13. The Analog to Digital Converter 13 is for receiving the analog input data from a host computer and then converting it into digital image signals. In general, the gray levels of a pixel can be represented by 8 bits. The image scaler 12 is responsible for up-scaling or down-scaling the image size, and the frame rate conversion. The resultant output interpolated image is then shown on the LCD monitor 11.
Refer to FIG. 2 for illustrating the method for resizing a source image. When the image is scaled up, the input of the image scaler 12 is 8 pixels while output of the image scaler 12 will be 16 pixels. In that case, the positions of the input pixels 21 are not in one-to-one correspondence with the output pixels 22. Thus, the interpolated pixels must be inserted into the source image to provide a smooth continuity on the digital image output.
The technology of interpolation determines the picture quality of the digital image generated by the image scaler. Theoretically, the number of sampling input pixels and the orders of an interpolation function are proportional to the performance of the effects generated. However, in practice, the most commonly used method is to determine the interpolated pixel data based on 2 or 3 sampling input pixels.
Refer to FIG. 3 for showing a figure of the scaling factor based on two sampling input pixels. The gray levels of the interpolated pixel Y(x) can be computed from the A, B sampling input pixels. The value of Y(x) can be obtained from the following interpolation function:
For 0xe2x89xa6x less than 1,
Y(x)=(1xe2x88x92SC(x))xc3x97A+SC(x)xc3x97B;xe2x80x83xe2x80x83(1)
where A and B represent the sampling input pixels closest to the interpolated pixel, and x represents the position of the interpolated pixel relative to A. And SC(x) is a scaling function for computing the scaling factor for the interpolation function.
There are two interpolation methods most commonly used in the arts, namely, Linear Interpolation method and Near Neighborhood method. The figure of the scaling factor following Near Neighborhood method is illustrated in FIG. 4. The scaling factors can be obtained by the following equation:
For 0xe2x89xa6x less than 0.5, SC(x)=0;
For 0.5xe2x89xa6x less than 1, SC(x)=1.
The advantage of the Near Neighboring method is that the contrast of the image is pleasing and the circuit design following the Near Neighboring method is simple. However, its disadvantage is that the interpolated image output cannot be scaled up evenly.
For comparison, the figure of the scaling factor SC(x) according to Linear Interpolation method is illustrated in FIG. 5. The scaling factor SC(x) can be obtained by:
For 0xe2x89xa6x less than 1, SC(x)=x.
In general, the picture quality generated by Linear Interpolation method is better than that of Near Neighborhood method. The interpolated image output can be scaled up evenly. However, for the images with strong contrast, such as text, the boundary of the image will be blurred if interpolated following the Linear Interpolation method.
Thus, it is a critical issue for the technology of the image scaler about how to maintain the picture quality of an image after resizing, and how to simplify the circuit design for the interpolation function in hardware/firmware. Moreover, the conventional LCD monitor does not provide function for adjusting the degree of sharpness. It is desirable to provide a function for users to manually adjust the degree of sharpness of the source image.
Accordingly, it is an object of the present invention to provide a method and apparatus for adjusting the picture quality of a digital image by dynamically adjusting a weight coefficient required for the two-order interpolation function derived by the present invention. Consequently, the sharpness of the image can be flexibly adjusted. The circuitry design can also be simplified, thereby to reduce the manufacturing cost.
In an aspect of the present invention, the apparatus of the present invention mainly includes: a control interface, a control unit, a vertical interpolation computation module, and a horizontal interpolation module. The control interface generates an adjusting signal in response to a requested degree of sharpness. The vertical interpolation computation module and the horizontal interpolation module are implemented according to an interpolation function derived by the present invention. The control unit comprises a lookup table built according to the scaling function of the present invention. The lookup table stores pre-calculated vertical scaling factor and horizontal scaling factor of an interpolated function defined by Y(x)=SC(x)xc3x97(Bxe2x88x92A)+A. The scaling function SC(x) is defined by
SC(x)=2(1xe2x88x92xcex1)x2+xcex1x, for 0xe2x89xa6x less than 0.5; and
SC(x)=xe2x88x922(1xe2x88x92xcex1)x2+(4xe2x88x923xcex1)xc3x97x+xcex1xe2x88x921 for 0.5xe2x89xa6x less than 1.
The vertical interpolation computation module computes the interpolated pixel data from two sampling input pixels according to the scaling factors output of the control unit. After the vertical interpolation procedure is finished, the resultant image data is sent to the horizontal interpolation module. Then, the horizontal interpolation module computes the interpolated pixel data on the resultant image output data after vertical interpolation according to the scaling factors output from the control unit. After completing the horizontal interpolation, the interpolated image data will be shown on the digital image display.
Another aspect of the present invention provides a method for adjusting the picture quality of the digital display device. The method includes the following steps: first, establish a lookup table for storing pre-calculated vertical scaling factor and horizontal scaling factor of an interpolation function defined by Y(x)=SC(x)xc3x97(Bxe2x88x92A)+A. The scaling function SC(x) is defined by SC(x)=2(1xe2x88x92xcex1)x2+xcex1x, for 0xe2x89xa6x less than 0.5; and SC(x)=xe2x88x922(1xe2x88x92xcex1)x2+(4xe2x88x923xcex1)xc3x97x+xcex1xe2x88x921 for 0.5xe2x89xa6x less than 1.
Then, select a desired degree of sharpness and generate a weight coefficient xcex1 in response to the desired degree of sharpness. After that, determine a vertical scaling factor and a horizontal scaling factor by looking up the lookup table in response to the weight coefficient xcex1. Then, calculate a vertical interpolated pixel data based on every two sampling input pixels from a source image according to the vertical scaling factor and generate a vertical interpolated image output. And after that, calculate a horizontal interpolated pixel data on the vertical interpolated image output and generate a resultant interpolated image output according to the horizontal scaling factor. Finally, display the resultant horizontal interpolated image output after the source image has been completely interpolated.